package com.tbi.graphcolouring.algorithmconfiguration.stopper;

import java.util.List;

import com.tbi.algorithm.configuration.IAlgorithmStopper;

public class GenerationStopper implements IAlgorithmStopper {
	private int maxGeneration;
	
	public GenerationStopper(int maxGeneration) {
		this.maxGeneration = maxGeneration;
	}

	@Override
	public boolean stopCondition(List<Object> population, int generation) {
		if(generation % 10 == 0)
			System.out.println(generation+"/"+maxGeneration);
		return maxGeneration <= generation;
	}

}
